﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using NUnit.Framework;
using wpffc.contracts.domaindata;
using wpffc.contracts.viewmodels.learning;

namespace wpffc.viewmodelmapping.tests
{
    [TestFixture]
    public class test_Map_card_to_learningVM
    {
        [Test]
        public void Map_card_to_VM()
        {
            var vm = new LearningViewModel();
            var sut = new Map_card_to_learningVM();
            sut.Inject(vm);

            sut.Process(new Card {Question="q", Answer="a"});

            Assert.AreEqual("q", vm.Question);
            Assert.AreEqual("a", vm.Answer);
            Assert.AreEqual(Visibility.Hidden, vm.AnswerVisibility);
            Assert.AreEqual(false, vm.ScoreKnowledgeCmd.IsEnabled);
        }
    }
}
